import {
  AllowNull,
  AutoIncrement,
  Column,
  DataType,
  Model,
  PrimaryKey,
  Table,
} from 'sequelize-typescript';

@Table({
  tableName: 'station_list',
})
export class StationModel extends Model {
  @PrimaryKey
  @AutoIncrement
  @Column({
    type: DataType.INTEGER,
    allowNull: false,
    comment: 'id',
  })
  id: string;

  @AllowNull(false)
  @Column({ type: DataType.INTEGER, comment: '' })
  parentId: number;

  @Column({
    type: DataType.INTEGER,
    comment: '类型 1 行业 2 职位',
  })
  type: number;

  @Column({
    type: DataType.TEXT('long'),
    comment: '',
  })
  name: string;
}
